package com.guguskins.back.entity.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author duttonliu
 * @date 2021/7/15 17:13
 */
@NoArgsConstructor
@Data
public class Item {
    @JsonProperty("appid")
    private Integer appid;
    @JsonProperty("bookmarked")
    private Boolean bookmarked;
    @JsonProperty("buy_max_price")
    private String buyMaxPrice;
    @JsonProperty("buy_num")
    private Integer buyNum;
    @JsonProperty("can_bargain")
    private Boolean canBargain;
    @JsonProperty("can_search_by_tournament")
    private Boolean canSearchByTournament;
    @JsonProperty("description")
    private String description;
    @JsonProperty("game")
    private String game;
    @JsonProperty("goods_info")
    private GoodsInfoDTO goodsInfo;
    @JsonProperty("has_buff_price_history")
    private Boolean hasBuffPriceHistory;
    @JsonProperty("id")
    private Integer id;
    @JsonProperty("market_hash_name")
    private String marketHashName;
    @JsonProperty("market_min_price")
    private String marketMinPrice;
    @JsonProperty("name")
    private String name;
    @JsonProperty("quick_price")
    private String quickPrice;
    @JsonProperty("sell_min_price")
    private String sellMinPrice;
    @JsonProperty("sell_num")
    private Integer sellNum;
    @JsonProperty("sell_reference_price")
    private String sellReferencePrice;
    @JsonProperty("short_name")
    private String shortName;
    @JsonProperty("steam_market_url")
    private String steamMarketUrl;
    @JsonProperty("transacted_num")
    private Integer transactedNum;

    @NoArgsConstructor
    @Data
    public static class GoodsInfoDTO {
        @JsonProperty("icon_url")
        private String iconUrl;
        @JsonProperty("info")
        private InfoDTO info;
        @JsonProperty("item_id")
        private Object itemId;
        @JsonProperty("original_icon_url")
        private String originalIconUrl;
        @JsonProperty("steam_price")
        private String steamPrice;
        @JsonProperty("steam_price_cny")
        private String steamPriceCny;

        @NoArgsConstructor
        @Data
        public static class InfoDTO {
            @JsonProperty("tags")
            private TagsDTO tags;

            @NoArgsConstructor
            @Data
            public static class TagsDTO {
                @JsonProperty("exterior")
                private ExteriorDTO exterior;
                @JsonProperty("quality")
                private QualityDTO quality;
                @JsonProperty("rarity")
                private RarityDTO rarity;
                @JsonProperty("type")
                private TypeDTO type;
                @JsonProperty("weapon")
                private WeaponDTO weapon;

                @NoArgsConstructor
                @Data
                public static class ExteriorDTO {
                    @JsonProperty("category")
                    private String category;
                    @JsonProperty("internal_name")
                    private String internalName;
                    @JsonProperty("localized_name")
                    private String localizedName;
                }

                @NoArgsConstructor
                @Data
                public static class QualityDTO {
                    @JsonProperty("category")
                    private String category;
                    @JsonProperty("internal_name")
                    private String internalName;
                    @JsonProperty("localized_name")
                    private String localizedName;
                }

                @NoArgsConstructor
                @Data
                public static class RarityDTO {
                    @JsonProperty("category")
                    private String category;
                    @JsonProperty("internal_name")
                    private String internalName;
                    @JsonProperty("localized_name")
                    private String localizedName;
                }

                @NoArgsConstructor
                @Data
                public static class TypeDTO {
                    @JsonProperty("category")
                    private String category;
                    @JsonProperty("internal_name")
                    private String internalName;
                    @JsonProperty("localized_name")
                    private String localizedName;
                }

                @NoArgsConstructor
                @Data
                public static class WeaponDTO {
                    @JsonProperty("category")
                    private String category;
                    @JsonProperty("internal_name")
                    private String internalName;
                    @JsonProperty("localized_name")
                    private String localizedName;
                }
            }
        }
    }

}
